import axios from 'axios';
axios.interceptors.response.use(
    response => {
        return response.data
    },
    error => {
        return Promise.reject(error)
    }
)
const key = import.meta.env.VITE_KEY;
function Http({
    url
}) {
    return axios({
        url
    })
}
const getCityListHttp = () => {
    return Http({
        url: "http://39.103.151.139:8000/city"
    })
}
const getLocationCityHttp = (city) => {
    return Http({
        url: `https://restapi.amap.com/v3/geocode/geo?address=${city}&key=${key}`
    })
}
export { getCityListHttp, getLocationCityHttp }